cmake_minimum_required(VERSION 3.0.0)
project(ohos_atm VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 17)

include_directories(
    interfaces/innerkits/accesstoken/include
    frameworks/common/include
    frameworks/accesstoken/include
    access_token/interfaces/innerkits/accesstoken/src
)
add_library(
    ohos_atm
    SHARED 
    interfaces/innerkits/accesstoken/src/accesstoken_kit.cpp
    interfaces/innerkits/accesstoken/src/accesstoken_death_recipient.cpp
    interfaces/innerkits/accesstoken/src/accesstoken_manager_client.cpp
    interfaces/innerkits/accesstoken/src/accesstoken_manager_proxy.cpp
    frameworks/accesstoken/src/hap_info_parcel.cpp
    frameworks/accesstoken/src/hap_policy_parcel.cpp
    frameworks/accesstoken/src/hap_token_info_for_sync_parcel.cpp
    frameworks/accesstoken/src/hap_token_info_parcel.cpp
    frameworks/accesstoken/src/native_token_info_for_sync_parcel.cpp
    frameworks/accesstoken/src/native_token_info_parcel.cpp
    frameworks/accesstoken/src/permission_def_parcel.cpp
    frameworks/accesstoken/src/permission_list_state_parcel.cpp
    frameworks/accesstoken/src/permission_state_full_parcel.cpp
    frameworks/common/src/data_validator.cpp
)

target_compile_definitions(ipc PUBLIC HILOG_ENABLE)

target_link_libraries(ohos_atm PUBLIC ohos_hilog)
target_link_libraries(ohos_atm PUBLIC ohos_utils)
target_link_libraries(ohos_atm PUBLIC ipc)
target_link_libraries(ohos_atm PUBLIC safwk)

target_include_directories(ohos_atm PUBLIC inc interfaces/innerkits/accesstoken/include)